package com.mall.serviceImpl;

import com.mall.bean.SysUser;
import com.mall.mapper.SysUserMapper;
import com.mall.mapper.UserMapper;
import com.mall.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by xiaochao on 2017/7/23.
 */
@Service("sysUserService")
public class SysUserServiceImpl
        implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    public List<SysUser> getUserList(){
        return sysUserMapper.getUserList();
    }

    public SysUser selectByUsernamePassword(String username, String password) {
        return sysUserMapper.selectByUsernamePassword(username,password);
    }

    public SysUser selectByUsername(String username) {
        System.out.println(sysUserMapper.selectByUsername(username).toString());;
        return sysUserMapper.selectByUsername(username);
    }


}
